cmake_minimum_required(VERSION 3.16)
project(CLionQt5Work LANGUAGES CXX)

# 设置 C++ 标准为 C++17，并且强制要求该标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# ---------------------- 编码设置 ----------------------
# MSVC 编译器下设置源码和执行字符集为 UTF-8   对应的是QT5的版本
#if(MSVC)
#    add_compile_options(/source-charset:utf-8 /execution-charset:utf-8)
#else()
    # 非 MSVC（如 GCC/Clang）设置输入输出字符编码为 UTF-8
#    add_compile_options(-finput-charset=UTF-8 -fexec-charset=UTF-8)
#endif()

if(MSVC)
    add_compile_options(/utf-8)
endif()


# ---------------------- Qt 配置 ----------------------
# 启用 Qt 自动生成 moc、uic 和 rcc 文件功能
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# 指定 Qt 安装路径，方便 find_package 找到 Qt 库
# set(CMAKE_PREFIX_PATH "E:/Qt/5.15.0/msvc2019_64")
#find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Sql Network)
#find_package(Qt5Charts REQUIRED)

set(CMAKE_PREFIX_PATH "E:/Qt6/6.5.3/msvc2019_64")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Sql Network Qml Quick Multimedia MultimediaWidgets)
find_package(Qt6Charts REQUIRED)

# ---------------------- ONNX Runtime 配置 ----------------------
set(ONNXRUNTIME_DIR "E:/onnxruntime-win-x64-1.22.0")
set(ONNXRUNTIME_INCLUDE_DIR "${ONNXRUNTIME_DIR}/include")
set(ONNXRUNTIME_LIB "${ONNXRUNTIME_DIR}/lib/onnxruntime.lib")
set(ONNXRUNTIME_DLL "${ONNXRUNTIME_DIR}/lib/onnxruntime.dll")

# ---------------------- ZLIB 配置 ----------------------
set(ZLIB_INCLUDE_DIR "E:/vcpkg/installed/x64-windows/include")
set(ZLIB_LIBRARY "E:/vcpkg/installed/x64-windows/lib/zlib.lib")
find_package(ZLIB REQUIRED)

# ---------------------- OpenCV 配置 ----------------------
# 手动指定 libaec 和 SZIP 路径（OpenCV 的依赖）
set(libaec_ROOT "E:/vcpkg/installed/x64-windows")
set(libaec_LIBRARY "${libaec_ROOT}/lib/libaec.lib")
set(libaec_INCLUDE_DIR "${libaec_ROOT}/include")
set(SZIP_LIBRARY "${libaec_ROOT}/lib/szip.lib")
set(SZIP_INCLUDE_DIR "${libaec_ROOT}/include")

# 显式设置 LibArchive 路径
set(LibArchive_ROOT "E:/vcpkg/installed/x64-windows")
find_path(LibArchive_INCLUDE_DIR archive.h PATHS "${LibArchive_ROOT}/include")
find_library(LibArchive_LIBRARY NAMES archive PATHS "${LibArchive_ROOT}/lib")

# 验证 LibArchive 路径是否有效
if(LibArchive_INCLUDE_DIR AND LibArchive_LIBRARY)
    message(STATUS "✅ Found LibArchive: ${LibArchive_LIBRARY}")
else()
    message(FATAL_ERROR "❌ LibArchive not found! Check vcpkg installation.")
endif()
# 显式查找 LibArchive
find_package(LibArchive REQUIRED)

# 显式设置 TIFF 路径，解决 OpenCV 配置时 TIFF 缺失的问题
set(TIFF_INCLUDE_DIR "E:/vcpkg/installed/x64-windows/include")
set(TIFF_LIBRARY "E:/vcpkg/installed/x64-windows/lib/tiff.lib")
find_package(TIFF REQUIRED)

# ---------------------------- CURL 配置 ----------------------------
set(CURL_INCLUDE_DIR "E:/vcpkg/installed/x64-windows/include")
set(CURL_LIBRARY "E:/vcpkg/installed/x64-windows/lib/libcurl.lib")
include_directories(${CURL_INCLUDE_DIR})
link_libraries(${CURL_LIBRARY})

if (EXISTS ${CURL_INCLUDE_DIR}/curl/curl.h)
    message(STATUS "✅ Found curl.h in ${CURL_INCLUDE_DIR}")
else()
    message(FATAL_ERROR "❌ curl.h not found in ${CURL_INCLUDE_DIR}")
endif()
find_package(CURL REQUIRED) #如果你使用了 vcpkg 安装的 curl，那么推荐直接使用：
# 查找 OpenCV，并指定需要的模块
find_package(OpenCV REQUIRED COMPONENTS core imgproc highgui photo xfeatures2d features2d)
message(STATUS "OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV_LIBS: ${OpenCV_LIBS}")

# ---------------------- 构建目标函数 ----------------------
function(configure_target target_name)
    # 添加可执行文件，${ARGN} 是传入的源码文件列表
    add_executable(${target_name} ${ARGN})
    # 添加头文件搜索路径
    target_include_directories(${target_name} PRIVATE
            ${OpenCV_INCLUDE_DIRS}
            ${ONNXRUNTIME_INCLUDE_DIR}
            ${ZLIB_INCLUDE_DIR}
    )
    # 添加库搜索路径（仅 ONNX Runtime 需要单独指定）
    target_link_directories(${target_name} PRIVATE
            "${ONNXRUNTIME_DIR}/lib"
    )
    # 链接库
    target_link_libraries(${target_name} PRIVATE
            ${OpenCV_LIBS}
            ${ZLIB_LIBRARY}
            ${ONNXRUNTIME_LIB}
            ${LibArchive_LIBRARY}   # LibArchive 库
            #Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Sql Qt5::Network Qt5::Charts  # Qt5 模块
            Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Sql Qt6::Network Qt6::Charts Qt6::Qml Qt6::Quick Qt6::Multimedia Qt6::MultimediaWidgets # Qt6 模块
    )
    target_include_directories(${target_name} PRIVATE ${CURL_INCLUDE_DIRS})
    target_link_libraries(${target_name} PRIVATE CURL::libcurl)
    # 指定 C++ 标准
    target_compile_features(${target_name} PRIVATE cxx_std_17)
    # 编译后复制 onnxruntime.dll 到可执行文件目录
    add_custom_command(TARGET ${target_name} POST_BUILD
            COMMAND ${CMAKE_COMMAND} -E copy_if_different
            "${ONNXRUNTIME_DLL}"
            "$<TARGET_FILE_DIR:${target_name}>"
            COMMENT "📦 正在复制 onnxruntime.dll..."
    )
    # Windows 平台下，使用 windeployqt 部署 Qt 运行时 DLL
    #if(WIN32)  Qt5版本
    #    add_custom_command(TARGET ${target_name} POST_BUILD
    #            COMMAND "${CMAKE_PREFIX_PATH}/bin/windeployqt.exe"
    #            # --no-angle
    #            --release
    #            "$<TARGET_FILE_DIR:${target_name}>"
    #            COMMENT "🔄 正在部署 Qt 运行时 DLL..."
    #    )
    #endif()
    if(WIN32)
        add_custom_command(TARGET ${target_name} POST_BUILD
                COMMAND "${CMAKE_PREFIX_PATH}/bin/windeployqt.exe"
                --release
                "$<TARGET_FILE:${target_name}>"
                COMMENT "🔄 正在部署 Qt 运行时 DLL..."
        )
    endif()

endfunction()
# ---------------------- 具体目标配置 -------------------------------------------------------
configure_target(MainExec src/main.cpp)

configure_target(formlayoutsprossu
        src/Layouts/formlayoutsprossu/formMain.cpp
        src/Layouts/formlayoutsprossu/widget.cpp
        src/Layouts/formlayoutsprossu/widget.h
)

configure_target(GridlayoutsPross
        src/Layouts/GridlayoutsPross/GridlayoutsMain.cpp
        src/Layouts/GridlayoutsPross/widget.h
        src/Layouts/GridlayoutsPross/widget.cpp
)

configure_target(LayoutMain
        src/Layouts/layoutsspacerstest/LayoutMain.cpp
        src/Layouts/layoutsspacerstest/mainwindow.cpp
        src/Layouts/layoutsspacerstest/mainwindow.h
)

# 注册登录组件
configure_target(ComLoginRegisterMain
        src/components/LoginRegisterWindow/LoginRegisterMain.cpp
        src/components/LoginRegisterWindow/LoginRegisterWindow.cpp
        src/components/LoginRegisterWindow/LoginRegisterWindow.h
)

# 登录注册组件（漂亮界面）
configure_target(ComLoginFormandRegisterMain
        src/components/LoginRegisterWindowD2/LoginFormandRegisterMain.cpp
        src/components/LoginRegisterWindowD2/LoginFormandRegister.h
        src/components/LoginRegisterWindowD2/LoginFormandRegister.cpp
        src/resource/Resource.qrc
)

# Push Button：命令按钮 QPushButtonPros
configure_target(QPushButtonPros
src/Buttons_Containers/QPushButtonPros/mainwindowQPushButtonProsMain.cpp
src/Buttons_Containers/QPushButtonPros/mainwindowQPushButtonPros.cpp
src/Buttons_Containers/QPushButtonPros/mainwindowQPushButtonPros.h)

# Tool Button：工具按钮 对应QToolButtonPros
configure_target(QToolButtonPros
src/Buttons_Containers/QToolButtonPros/MainWindowQToolButtonProsMain.cpp
src/Buttons_Containers/QToolButtonPros/mainwindowQToolButtonPros.h
src/Buttons_Containers/QToolButtonPros/mainwindowQToolButtonPros.cpp)

# Tool Button：工具按钮 对应QToolButtonProsD2
configure_target(QToolButtonProsD2
src/Buttons_Containers/QToolButtonProsD2/mainwindowQToolButtonProsD2Main.cpp
src/Buttons_Containers/QToolButtonProsD2/mainwindowQToolButtonProsD2.cpp
src/Buttons_Containers/QToolButtonProsD2/mainwindowQToolButtonProsD2.h)

## 单选按钮 QRadioButtonProsMain
configure_target(QRadioButtonProsMain
src/Buttons_Containers/QRadioButton/QRadioButtonProsMain.cpp
src/Buttons_Containers/QRadioButton/QRadioButtonPros.h
src/Buttons_Containers/QRadioButton/QRadioButtonPros.cpp)

## 复选框QCheckBoxPros
configure_target(QCheckBoxPros
src/Buttons_Containers/QCheckBoxPros/QCheckBoxProsMain.cpp
src/Buttons_Containers/QCheckBoxPros/QCheckBoxPros.h
src/Buttons_Containers/QCheckBoxPros/QCheckBoxPros.cpp)

## Command Link Button：命令链接按钮
configure_target(QCommandLinkButtonProsMain
src/Buttons_Containers/QCommandLinkButtonPros/QCommandLinkButtonProsMain.cpp
src/Buttons_Containers/QCommandLinkButtonPros/QCommandLinkButtonPros.h
src/Buttons_Containers/QCommandLinkButtonPros/QCommandLinkButtonPros.cpp)

## ## Dialog Button Box：按钮盒
configure_target(QDialogButtonBoxProsMain
src/Buttons_Containers/QDialogButtonBoxPros/QDialogButtonBoxProsMain.cpp
src/Buttons_Containers/QDialogButtonBoxPros/QDialogButtonBoxPros.h
src/Buttons_Containers/QDialogButtonBoxPros/QDialogButtonBoxPros.cpp)

## Dialog Button Box：按钮盒 实现 数据库登录配置窗口
configure_target(DatabaseSettingWindowMain
src/Buttons_Containers/DatabaseSettingWindow/DatabaseSettingWindowMain.cpp
src/Buttons_Containers/DatabaseSettingWindow/DatabaseSettingWindow.h
src/Buttons_Containers/DatabaseSettingWindow/DatabaseSettingWindow.cpp)

## Group Box：组合框：提供带有标题的组合框框架
configure_target(GroupBoxTestProssMain
src/Buttons_Containers/GroupBoxTestPross/GroupBoxTestProssMain.cpp
src/Buttons_Containers/GroupBoxTestPross/GroupBoxTestPross.h
src/Buttons_Containers/GroupBoxTestPross/GroupBoxTestPross.cpp)

## Scroll Area：滚动区域
configure_target(QScrollAreaTestProssMain
src/Buttons_Containers/QScrollAreaTestPross/QScrollAreaTestProssMain.cpp
src/Buttons_Containers/QScrollAreaTestPross/QScrollAreaTestPross.h
src/Buttons_Containers/QScrollAreaTestPross/QScrollAreaTestPross.cpp
        src/resource/Resource.qrc)

## Tab Widget：标签小部件
configure_target(TabWidgetsProssMain
src/Buttons_Containers/QTabWidgetsPross/TabWidgetsProssMain.cpp
src/Buttons_Containers/QTabWidgetsPross/TabWidgetsPross.h
src/Buttons_Containers/QTabWidgetsPross/TabWidgetsPross.cpp)

## Tab Widget：标签小部件D2
configure_target(TabWidgetsProssMainD2
src/Buttons_Containers/QTabWidgetsPross/TabWidgetsProssMainD2.cpp
src/resource/Resource.qrc)

## Wizard with QStackedWidget 一个完整的 Qt C++ 示例，演示如何使用 QStackedWidget 实现一个 多步骤向导（Wizard）界面，
configure_target(Wizard_with_QStackedWidget
src/Buttons_Containers/QStackedWidget/Wizard_with_QStackedWidget.cpp)

# 下面是一个完整的 Qt 示例，演示如何实现一个经典的 “设置面板”布局：
# 左边是 QListWidget，用于显示菜单项（如：系统、账户、安全、更新）
# 右边是 QStackedWidget，用于展示每个菜单对应的内容页面
# 点击左侧菜单，右侧自动切换显示相应页面
configure_target(QListWidgetQStackedWidget
src/Buttons_Containers/QStackedWidget/QListWidgetQStackedWidget.cpp)

# 使用 QFrame 实现一个有边框的容器
configure_target(QFrameD1
src/Buttons_Containers/QFrameLearn/QFrameD1.cpp)

# 使用 QFrame 实现一个有边框的容器
configure_target(QFrameD2
        src/Buttons_Containers/QFrameLearn/QFrameD2.cpp)


## LoginResiterForgot 登录注册忘记密码相关操作
configure_target(LoginResiterForgot
src/Buttons_Containers/QStackedWidget/LoginResiterForgot.cpp)

# QMdiArea 是 Qt 提供的多文档界面（Multiple Document Interface）容器，类似于一个“主窗口”，可以管理多个子窗口（QMdiSubWindow）。
# 适用于需要同时打开多个编辑窗口或视图的应用，如文本编辑器、图像处理软件等。
configure_target(QMdiAreaD1
src/Buttons_Containers/QMdiAreaLearn/QMdiAreaD1.cpp)

configure_target(QMdiAreaD2
        src/Buttons_Containers/QMdiAreaLearn/QMdiAreaD2.cpp)

# DockWidget停靠窗体部件
configure_target(DockWidgetMain
src/Buttons_Containers/DockWidget停靠窗体部件/DockWidgetMain.cpp)

# 下面给出一个完整示例：使用 QListView + QStandardItemModel 显示一个图标+文字列表
configure_target(QListViewQStandardItemModel
        src/ItemViews_ItemWidgets/ListView清单视图/QListViewQStandardItemModel.cpp
)

# 部门结构树 QTreeView（树视图）
configure_target(QTreeViewD1
src/ItemViews_ItemWidgets/QTreeView树视图/QTreeViewD1.cpp)

# QTableViewD1 QTableView 是用于显示二维表格数据的控件，常搭配 QStandardItemModel、数据库模型等。
configure_target(QTableViewD1
src/ItemViews_ItemWidgets/QTableView表格视图/QTableViewD1.cpp)

# QColumnView 是一个支持多级列导航的控件（类似 macOS Finder），自动在右侧展开子项。
configure_target(QColumnViewD1
src/ItemViews_ItemWidgets/QColumnView列视图/QColumnViewD1.cpp)

##  Qt 综合视图案例：商品管理界面
configure_target(TestCase1
src/ItemViews_ItemWidgets/Qt综合视图案例商品管理界面/TestCase.cpp)

## 整合所有常见 Input Widgets 的 Qt 示例，你可以在一个窗口中查看、操作每种输入控件的行为。
configure_target(QInputWidgetsD1
src/InputWidgets输入控件模块/QInputWidgetsD1.cpp)




#######################################如下展示的是项目形式的文件夹####################################

##############D07Qt入门到精通专栏[布局对话框]相关代码如下开始#############
configure_target(D07_D1_01
        src/D07Qt/D1_01/main.cpp
        src/D07Qt/D1_01/mainwindowD1_01.h
        src/D07Qt/D1_01/mainwindowD1_01.cpp)

configure_target(D07_D2_01
src/D07Qt/D2_01/main.cpp
src/D07Qt/D2_01/mainwindowD2_01.h
src/D07Qt/D2_01/mainwindowD2_01.cpp)

configure_target(D07_D3_01
src/D07Qt/D3_01/main.cpp
src/D07Qt/D3_01/qfiledialogtest.h
src/D07Qt/D3_01/qfiledialogtest.cpp)

configure_target(D07_D4_01
src/D07Qt/D4_01QColorDialogProsssss/main.cpp
src/D07Qt/D4_01QColorDialogProsssss/dialog.h
src/D07Qt/D4_01QColorDialogProsssss/dialog.cpp)

configure_target(D07_D5_01
src/D07Qt/D5_01QFontDialogProsssss/main.cpp
src/D07Qt/D5_01QFontDialogProsssss/dialog.h
src/D07Qt/D5_01QFontDialogProsssss/dialog.cpp)

configure_target(D07_D6_01
src/D07Qt/D6_01QInputDialogProssss/main.cpp
src/D07Qt/D6_01QInputDialogProssss/dialog.h
src/D07Qt/D6_01QInputDialogProssss/dialog.cpp)

configure_target(D07_D7_01
src/D07Qt/D7_01QMessageBoxProssss/main.cpp
src/D07Qt/D7_01QMessageBoxProssss/dialog.h
src/D07Qt/D7_01QMessageBoxProssss/dialog.cpp)
##############D07Qt入门到精通专栏[布局对话框]相关代码结束############

#####################D08Qt的相关代码开始#############################
configure_target(D0801-01
src/D08Qt/D0801/QGraphicDrawAPIProssss/main.cpp
src/D08Qt/D0801/QGraphicDrawAPIProssss/dialog.h
src/D08Qt/D0801/QGraphicDrawAPIProssss/dialog.cpp)

configure_target(D0801-02
src/D08Qt/D0801/QGraphicTestProssss/main.cpp
src/D08Qt/D0801/QGraphicTestProssss/mainwindow.h
src/D08Qt/D0801/QGraphicTestProssss/mainwindow.cpp
src/D08Qt/D0801/QGraphicTestProssss/drawwidget.h
src/D08Qt/D0801/QGraphicTestProssss/drawwidget.cpp)

configure_target(D0801-03
src/D08Qt/D0801/QPainterProssss/main.cpp
src/D08Qt/D0801/QPainterProssss/widget.h
src/D08Qt/D0801/QPainterProssss/widget.cpp
src/D08Qt/D0801/QPainterProssss/painterarea.h
src/D08Qt/D0801/QPainterProssss/painterarea.cpp)

configure_target(D0802-01QFileBinaryFile2
src/D08Qt/D0802/QFileBinaryFile2/main.cpp)

configure_target(D0802-02QFileTextFile1
src/D08Qt/D0802/QFileTextFile1/main.cpp)

configure_target(D0802-03QTextStreamFile1
src/D08Qt/D0802/QTextStreamFile1/main.cpp)

configure_target(D0802-04QGraphicsViewSceneItemProssss
src/D08Qt/D0802/QGraphicsViewSceneItemProssss/main.cpp
src/D08Qt/D0802/QGraphicsViewSceneItemProssss/mainwidget.h
src/D08Qt/D0802/QGraphicsViewSceneItemProssss/mainwidget.cpp
src/D08Qt/D0802/QGraphicsViewSceneItemProssss/pixitem.h
src/D08Qt/D0802/QGraphicsViewSceneItemProssss/pixitem.cpp)
#####################D08Qt的相关代码结束#############################

##############################开始QtD010相关代码的展示########################################
configure_target(QtD010_01_QGetDomainIpProssss
        src/D10Qt/D010_01/QGetDomainIpProssss/main.cpp
        src/D10Qt/D010_01/QGetDomainIpProssss/getdomainips.h
        src/D10Qt/D010_01/QGetDomainIpProssss/getdomainips.cpp
)

configure_target(QtD010_02_QGetHostNameIPAndInfoProssss
src/D10Qt/D010_01/QGetHostNameIPAndInfoProssss/main.cpp
src/D10Qt/D010_01/QGetHostNameIPAndInfoProssss/gethostnameipinfo.h
src/D10Qt/D010_01/QGetHostNameIPAndInfoProssss/gethostnameipinfo.cpp
src/D10Qt/D010_01/QGetHostNameIPAndInfoProssss/resjpg.qrc)

configure_target(QtD010_02_QTcpClientProssss
    src/D10Qt/D010_02TCP/QTcpClientProssss/main.cpp
    src/D10Qt/D010_02TCP/QTcpClientProssss/mainwindow.h
    src/D10Qt/D010_02TCP/QTcpClientProssss/mainwindow.cpp
)
configure_target(QtD010_02_QTcpServerProssss
        src/D10Qt/D010_02TCP/QTcpServerProssss/main.cpp
        src/D10Qt/D010_02TCP/QTcpServerProssss/mainwindow.h
        src/D10Qt/D010_02TCP/QTcpServerProssss/mainwindow.cpp
)
configure_target(QtD010_03_QUdpProssss
        src/D10Qt/D010_03UDP/QUdpCProssss/main.cpp
        src/D10Qt/D010_03UDP/QUdpCProssss/udpcomm.h
        src/D10Qt/D010_03UDP/QUdpCProssss/udpcomm.cpp)

configure_target(QtD010_05_QClientProssss
        src/D10Qt/D010_05/QClientProssss/main.cpp
        src/D10Qt/D010_05/QClientProssss/dialog.h
        src/D10Qt/D010_05/QClientProssss/dialog.cpp
        src/D10Qt/D010_05/QClientProssss/dialog.ui)

configure_target(QtD010_05_QMultiThreadServer
        src/D10Qt/D010_05/QMultiThreadServer/main.cpp
        src/D10Qt/D010_05/QMultiThreadServer/dialog.h
        src/D10Qt/D010_05/QMultiThreadServer/dialog.cpp
        src/D10Qt/D010_05/QMultiThreadServer/handlethread.h
        src/D10Qt/D010_05/QMultiThreadServer/handlethread.cpp
        src/D10Qt/D010_05/QMultiThreadServer/tcpserverp.h
        src/D10Qt/D010_05/QMultiThreadServer/tcpserverp.cpp
        src/D10Qt/D010_05/QMultiThreadServer/dialog.ui)

configure_target(QtD010_06_GetHttpResProssss
        src/D10Qt/D010_06/GetHttpResProssss/main.cpp
        src/D10Qt/D010_06/GetHttpResProssss/mainwindow.h
        src/D10Qt/D010_06/GetHttpResProssss/mainwindow.cpp
        src/D10Qt/D010_06/GetHttpResProssss/mainwindow.ui)

configure_target(QtD010_06_myhttpserverprossss
        src/D10Qt/D010_06/myhttpserverprossss/main.cpp
        src/D10Qt/D010_06/myhttpserverprossss/myhttpserver.h
        src/D10Qt/D010_06/myhttpserverprossss/myhttpserver.cpp)
##############################结束QtD010相关代码的展示########################################

##############################结束QtD011相关代码的展示开始########################################
configure_target(QtD01101QChartSinCosPros
        src/D11Qt/D01101/QChartSinCosPros/main.cpp
        src/D11Qt/D01101/QChartSinCosPros/mainwindow.h
        src/D11Qt/D01101/QChartSinCosPros/mainwindow.cpp
        src/D11Qt/D01101/QChartSinCosPros/mainwindow.ui
)

configure_target(QtD01101QChartTestPrs
        src/D11Qt/D01101/QChartTestPrs/main.cpp
        src/D11Qt/D01101/QChartTestPrs/widget.h
        src/D11Qt/D01101/QChartTestPrs/widget.cpp
        src/D11Qt/D01101/QChartTestPrs/widget.ui
)

configure_target(QtD01102QBarSeriesPrs
        src/D11Qt/D01102/QBarSeriesPrs/main.cpp
        src/D11Qt/D01102/QBarSeriesPrs/mainwindow.h
        src/D11Qt/D01102/QBarSeriesPrs/mainwindow.cpp
        src/D11Qt/D01102/QBarSeriesPrs/mainwindow.ui
)
configure_target(QtD01102QLineSeriesPrs
        src/D11Qt/D01102/QLineSeriesPrs/main.cpp
        src/D11Qt/D01102/QLineSeriesPrs/widget.h
        src/D11Qt/D01102/QLineSeriesPrs/widget.cpp
        src/D11Qt/D01102/QLineSeriesPrs/widget.ui
)

configure_target(QtD01102QPieChartPrs
        src/D11Qt/D01102/QPieChartPrs/main.cpp
        src/D11Qt/D01102/QPieChartPrs/mainwindow.h
        src/D11Qt/D01102/QPieChartPrs/mainwindow.cpp
        src/D11Qt/D01102/QPieChartPrs/mainwindow.ui
)

configure_target(QtD011D01103QFristQmlPro
    src/D11Qt/D01103QFristQmlPro/main.cpp
    src/D11Qt/D01103QFristQmlPro/main.qml
    src/D11Qt/D01103QFristQmlPro/qml.qrc)


configure_target(D12QButtonTest
    src/D12QtOML/D1201Base/QButtonTest/main.cpp
    src/D12QtOML/D1201Base/QButtonTest/main.qml
    src/D12QtOML/D1201Base/QButtonTest/qml.qrc
    src/D12QtOML/D1201Base/QButtonTest/images.qrc)

configure_target(D1203QLayoutTest
    src/D12QtOML/D1203OMLBuJu/QLayoutTest/main.cpp
    src/D12QtOML/D1203OMLBuJu/QLayoutTest/main.qml
    src/D12QtOML/D1203OMLBuJu/QLayoutTest/qml.qrc)

configure_target(MyQMLD1
src/D12QtOML/MyWK/BasicVisualization/main.cpp
src/D12QtOML/MyWK/BasicVisualization/main.qml
src/D12QtOML/MyWK/BasicVisualization/qml.qrc)
##############################结束QtD011相关代码的展示结束########################################

##################################QTCASE案例的展示开始###########################################
#  Qt 的信号与槽机制
configure_target(QTCASED1
        src/QTCASE/CASED1/main.cpp
        src/QTCASE/CASED1/leftwidget.h
        src/QTCASE/CASED1/leftwidget.cpp
        src/QTCASE/CASED1/ocrprocessor.h
        src/QTCASE/CASED1/ocrprocessor.cpp)

# 案例界面设计的案例
configure_target(QTCASED2
src/QTCASE/CASED2/main.cpp
src/QTCASE/CASED2/mainwindow.h
src/QTCASE/CASED2/mainwindow.cpp)

# 案例界面设计、在D2的基础上进行完善。
# 命名为 D3
configure_target(QTCASED3
src/QTCASE/CASED3/main.cpp
src/QTCASE/CASED3/mainwindow.h
src/QTCASE/CASED3/mainwindow.cpp
src/QTCASE/CASED3/ImageLabel/ImageLabel.h
src/QTCASE/CASED3/ImageLabel/ImageLabel.cpp)

configure_target(QTCASED4
src/QTCASE/CASED4/main.cpp
src/QTCASE/CASED4/mainwindow.h
src/QTCASE/CASED4/mainwindow.cpp
src/QTCASE/CASED4/imagelabel.h
src/QTCASE/CASED4/imagelabel.cpp)

configure_target(QTCASED5
        src/QTCASE/CASED5/main.cpp
        src/QTCASE/CASED5/mainwindow.h
        src/QTCASE/CASED5/mainwindow.cpp
        src/QTCASE/CASED5/ImageLabel/ImageLabel.h
        src/QTCASE/CASED5/ImageLabel/ImageLabel.cpp)

configure_target(DesktopPet
src/QTCASE/DesktopPet/main.cpp
src/QTCASE/DesktopPet/widget/DesktopPet.h
src/QTCASE/DesktopPet/widget/DesktopPet.cpp
src/QTCASE/DesktopPet/qrc_resource.qrc)
##################################QTCASE案例的展示结束###########################################

##########设置一个组件案例代码，方便直接的复制使用开始#######################################
## 此处的代码并不涉及项目，只是方便未来的组件复用的相关操作
# 开始MyDialogUI的布局设计
configure_target(MyDialogUI
        src/Example/MyDialogUI/main.cpp
        src/Example/MyDialogUI/mydialog.h
        src/Example/MyDialogUI/mydialog.cpp
        src/Example/MyDialogUI/UI/MyDialogUI.h
        src/Example/MyDialogUI/UI/MyDialogUI.cpp)

# 开始验证Qt槽函数的功能与实现操作
configure_target(ExampleQtSingl
        src/Example/ExampleQtSingl/main.cpp
        src/Example/ExampleQtSingl/mainwindow.h
        src/Example/ExampleQtSingl/mainwindow.cpp
        src/Example/ExampleQtSingl/mydialog.h
        src/Example/ExampleQtSingl/mydialog.cpp)

# 开始验证Qt之间的指针操作
configure_target(ExampleQtZhiZhen
        src/Example/ExampleQtZhiZhen/main.cpp
        src/Example/ExampleQtZhiZhen/mainwindow.h
        src/Example/ExampleQtZhiZhen/mainwindow.cpp
        src/Example/ExampleQtZhiZhen/mydialog.h
        src/Example/ExampleQtZhiZhen/mydialog.cpp)
##########设置一个组件案例代码，方便直接的复制使用结束#######################################